package day1.HomeWork;

import java.util.ArrayList;
import java.util.List;

/**
 * ClassName：Return2
 *
 * @Author：小鱼
 * @Create：2025-08-18 18:48
 */
public class Return2 {
    public static void main(String[] args) {
        System.out.println(testReturn2());
    }
    private static List<Integer> testReturn2() {
        List<Integer> list = new ArrayList<>();
        try {
            list.add(1);
            System.out.println("try:" + list);
            return list;
        } finally {
            list.add(3);
            System.out.println("finally:" + list);
        }
    }
}
